import java.io.File;


public class PLFileUtils {

	public static String GetModifyExt() {
		return ".mod";
	}
	
	public static String GetFolderName() {
		return "out" + File.separator + "data" + File.separator;
	}

	public static String GetFullDirPath(String reldir) {
		return GetFolderName() + reldir + File.separator;
	}

	public static boolean MakeFullDirPath(String reldir) {
		 return (new File(GetFullDirPath(reldir))).mkdirs();
	}

	public static boolean Exists(String name) {
		File file=new File(name);
		return file.exists();
	}


	// QUERY RESPONSE FILE
	public static String GetQRFileName() {
		return "qr";
	}

	public static String GetQRFile(String name) {
		return GetFullDirPath(name) + GetQRFileName();		
	}

	// FEATURE FILE
	public static String GetFeatureFileName() {
		return "feature.learn";
	}

	public static String GetFeatureFile(String name) {
		return GetFullDirPath(name) + GetFeatureFileName();		
	}

	public static String GetModifiedFeatureFile(String name) {
		return GetFeatureFile(name) + GetModifyExt();		
	}


	// PATTERN FILE
	public static String GetPatternFileName() {
		return "pattern.learn";
	}

	public static String GetPatternFile(String name) {
		return GetFullDirPath(name) + GetPatternFileName();		
	}

	public static String GetModifiedPatternFile(String name) {
		return GetPatternFile(name) + GetModifyExt();		
	}

	// COGNITION FILE
	public static String GetCognitionFileName() {
		return "cognition.learn";
	}

	public static String GetCognitionFile(String name) {
		return GetFullDirPath(name) + GetCognitionFileName();		
	}

	public static String GetModifiedCognitionFile(String name) {
		return GetCognitionFile(name) + GetModifyExt();		
	}

}

